import qs from "qs"
//统一管理接口地址
import request from "@/request/request.js";
//定义对应接口:
export const JingPinAPI = () => request.get("/products/recommend"
);
//热门兑换
export const ReMenAPI = () => request.get("/products/hot");
//发送短信验证码
export const SendMSAPI = (params) => request.post("/sendSMS", qs.stringify(params));

//登录
export const phoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params));

//商品详情
//登录
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`);

//
export const weixinLoginAPI = (params) => request.post(`/wechatUsers/PCLogin`, qs.stringify(params));
export const BingdingWeixinAPI = (params) => request.post(`/wechatUsers/binding`, qs.stringify(params));

//请求用户信息
export const UserProfilesAPI = () => request.get("/shop/userProfiles");

//加入购物车
export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params));

//请求用户信息
export const GoodsSearchAPI = (params) => request.get("/products", { params });




//查看购物车
export const ShopCartssAPI = () => request.get("/shop/carts");
